package com.liu.qqRobot.wm.entity.dto;

import cn.hutool.core.annotation.Alias;
import com.liu.common.entity.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.List;

@Getter
@Setter
public class WarframeMarketRivenAuctionDTO extends BaseEntity {

    private String note;

    private Boolean visible;

    private Item item;

    /**
     * 最低声誉
     */
    @Alias("minimal_reputation")
    private Integer minimalReputation;

    /**
     * 一口价
     */
    @Alias("buyout_price")
    private Integer buyoutPrice;

    /**
     * 起拍价
     */
    @Alias("starting_price")
    private Integer startingPrice;

    /**
     * 卖家信息
     */
    private Owner owner;

    private String platform;

    /**
     * 是否关闭
     */
    private Boolean closed;

    /**
     * 最高出价
     */
    @Alias("top_bid")
    private Integer topBid;

    /**
     * 买家
     */
    private String winner;

    @Alias("is_marked_for")
    private String isMarkedFor;

    @Alias("marked_operation_at")
    private String markedOperationAt;

    private String created;

    private String updated;

    @Alias("note_raw")
    private String noteRaw;

    @Alias("is_direct_sell")
    private Boolean isDirectSell;

    private String id;

    @Alias("private")
    private Boolean privateB;

    /**
     * 顺序 offline-3 ingame-1 online-2
     */
    private Integer sort;

    @Getter
    @Setter
    public static class Item extends BaseEntity {

        /**
         * 属性
         */
        private List<Attribute> attributes;

        /**
         * 使用段位
         */
        @Alias("mastery_level")
        private Integer masteryLevel;

        /**
         * 槽位极性
         */
        private String polarity;

        /**
         * 循环次数
         */
        @Alias("re_rolls")
        private Integer reRolls;

        /**
         * mod等级
         */
        @Alias("mod_rank")
        private Integer modRank;

        /**
         * 类型
         */
        private String type;

        /**
         * 紫卡名称
         */
        private String name;

        /**
         * 紫卡物品名称
         */
        @Alias("weapon_url_name")
        private String weaponUrlName;

        @Getter
        @Setter
        public static class Attribute extends BaseEntity {

            /**
             * 数值
             */
            private BigDecimal value;

            /**
             * 是否正向
             */
            private Boolean positive;

            /**
             * 属性urlName
             */
            @Alias("url_name")
            private String urlName;
        }
    }

    @Getter
    @Setter
    public static class Owner extends BaseEntity {

        /**
         * 声誉
         */
        private Integer reputation;

        private String locale;

        @Alias("last_seen")
        private String lastSeen;

        @Alias("ingame_name")
        private String ingameName;

        private String status;

        private String id;

        private String region;

        private String avatar;
    }
}
